<!DOCTYPE html>
<html lang="en">
	<head>
		<title>编辑商品</title>
		<!--#include file="/pages/common/head.html"-->
	</head>

	<body>
		<!--#include file="/pages/common/header.html"-->

		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<div class="sidebar" id="sidebar">
					<!--#include file="/pages/common/sidebar.html"-->

					<ul class="nav nav-list">
						<li>
							<a href="http://student.achievement.net/pages/admin/super/role/role-list.html">
								<i class="icon-list"></i>
								<span class="menu-text"> 角色管理 </span>
							</a>

							<ul class="submenu">
								<li>
									<a href="http://student.achievement.net/pages/admin/super/role/role-list.html">
										<i class="icon-double-angle-right"></i>
										角色列表
									</a>
								</li>

								<li class="active">
									<a href="http://student.achievement.net/pages/admin/super/role/edit-role.html">
										<i class="icon-double-angle-right"></i>
										添加角色
									</a>
								</li>

							</ul>
						</li>

						<li>
							<a href="http://student.achievement.net/pages/admin/super/permission/permission-list.html">
								<i class="icon-code"></i>
								<span class="menu-text"> 权限管理 </span>
							</a>

							<ul class="submenu">
								<li class="active">
									<a href="http://student.achievement.net/pages/admin/super/permission/permission-list.html">
										<i class="icon-double-angle-right"></i>
										权限列表
									</a>
								</li>

								<li>
									<a href="http://student.achievement.net/pages/admin/super/permission/edit-permission.html">
										<i class="icon-double-angle-right"></i>
										添加权限
									</a>
								</li>

							</ul>
						</li>
						<li class="active">
							<a href="http://student.achievement.net/pages/admin/super/base-info/edit-password.html">
								<i class="icon-user"></i>
								<span class="menu-text"> 基本信息管理 </span>
							</a>

							<ul class="submenu">
								<li class="active">
									<a href="http://student.achievement.net/pages/admin/super/base-info/edit-password.html">
										<i class="icon-double-angle-right"></i>
										修改密码
									</a>
								</li>
							</ul>
						</li>

					</ul><!-- /.nav-list -->
				</div>

				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="#">音像商店管理系统</a>
							</li>
							<li>管理商品</li>
							<li class="active">编辑商品</li>
						</ul><!-- .breadcrumb -->
					</div>

					<div class="page-content">
						<div class="page-header">
							<h1>
								编辑商品
							</h1>
						</div><!-- /.page-header -->

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="row">
									<div class="col-xs-12">
									  	<form class="form-horizontal" role="form" method="" action="">
											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right"> 商品名称 </label>

												<div class="col-sm-9">
													<input type="text" placeholder="商品名称" class="col-xs-10 col-sm-5" name="name" value="" />&nbsp; &nbsp; &nbsp;
													<input type="hidden" name="id" value="" />
												</div>
											</div>

											<div class="space-4"></div>

											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right"> 商品总数 </label>

												<div class="col-sm-9">
													<input type="text" placeholder="商品总数" class="col-xs-10 col-sm-5" name="totalNum" value="" />&nbsp; &nbsp; &nbsp;
												</div>
											</div>

											<div class="space-4"></div>

											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right"> 当前数量 </label>

												<div class="col-sm-9">
													<input type="text" placeholder="当前数量" class="col-xs-10 col-sm-5" name="curNum" value="" />&nbsp; &nbsp; &nbsp;
												</div>
											</div>

											<div class="space-4"></div>

											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right"> 供应商编号 </label>

												<div class="col-sm-9">
													<input type="text" placeholder="供应商编号" class="col-xs-10 col-sm-5" name="supplierId" value="" />&nbsp; &nbsp; &nbsp;
												</div>
											</div>

											<div class="space-4"></div>

											<div class="form-group">
												<label class="col-sm-3 control-label no-padding-right"> 商品描述 </label>

												<div class="col-sm-9">
													<textarea placeholder="请输入商品描述" class="col-sm-5"name="desc" value="" ></textarea>&nbsp; &nbsp; &nbsp;
												</div>
											</div>

											<div class="clearfix form-actions">
												<div class="col-md-offset-3 col-md-9">
													<button class="btn btn-info" type="submit">
														<i class="icon-ok bigger-110"></i>
														保存
													</button>

													&nbsp; &nbsp; &nbsp;
													<button class="btn" type="reset">
														<i class="icon-undo bigger-110"></i>
														重置
													</button>
												</div>
											</div>
										</form>
									</div>
								</div><!-- /row -->
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!--#include file="/pages/common/footer.html"-->
		<script type="text/javascript" src="/resources/js/jquery.validate.min.js"></script>
		<script type="text/javascript">
		$(function($){
			$('form').validate({
					errorElement: 'div',
					errorClass: 'help-block',
					focusInvalid: false,
					rules: {
						name: {
							required: true
						},
						totalNum: {
							required: true
						},
						curNum: {
							required: true
						},
						supplierId: {
							required: true
						}
					},
			
					messages: {
						name: {
							required: "请输入商品名称"
						},
						totalNum: {
							required: "请输入商品总数"
						},
						curNum:{
							required: "请输入当前数量"
						},
						supplierId:{
							required: "请输入供应商编号123"
						}
					},
					invalidHandler: function (event, validator) { //display error alert on form submit   
						$('.alert-danger', $('.login-form')).show();
					},
					highlight: function (e) {
						$(e).closest('.form-group').removeClass('has-info').addClass('has-error');
					},
					success: function (e) {
						$(e).closest('.form-group').removeClass('has-error').addClass('has-info');
						$(e).remove();
					},
					errorPlacement: function (error, element) {
						error.insertAfter(element);
					},
					submitHandler: function (form) {
						form.submit();
					},
					invalidHandler: function (form) {
					}
				});
		});
		</script>
	</body>
</html>
